# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd


if __name__ == '__main__':
    s1 = pd.Series(range(10, 20),index=range(10))
    s2 = pd.Series(range(1, 6), index=range(5, 10))
    print "-----------s2------------"
    print s1
    print "-----------s2------------"
    print s2
    print "-----------s1 + s2------------"
    print s1+s2
    print "------------ 没有对齐的添加 1 -----------------------"
    print s1.add(s2, fill_value=1)
    print s1.sub(s2 , fill_value=20)
    print "====================================="
    df1 = pd.DataFrame(np.ones((2, 2)), columns=['a', 'b'])
    df2 = pd.DataFrame(np.ones((3, 3)), columns=['a', 'b', 'c'])
    print df1
    print df2
    print df1+df2
    print df1.add(df2, fill_value=0)